package slidingpenguins.utils.imagecache {
	import flash.events.EventDispatcher;
	import flash.utils.ByteArray;

	[Bindable]
	public class MutableCachedImage extends EventDispatcher implements CachedImage {
		private var _bytes:ByteArray;
		private var _isReady:Boolean;
		private var _isInErrorState:Boolean;

		public function MutableCachedImage() {
			_bytes = null;
			_isReady = false;
			_isInErrorState = false;
		}

		public function get bytes():ByteArray {
			return _bytes;
		}
		
		public function set bytes(bytes:ByteArray):void {
			_bytes = bytes;
		}

		public function get isReady():Boolean {
			return _isReady;
		}
		
		public function set isReady(isReady:Boolean):void {
			_isReady = isReady;
		}
		
		public function get isInErrorState():Boolean {
			return _isInErrorState;
		}
		
		public function set isInErrorState(isInErrorState:Boolean):void {
			_isInErrorState = isInErrorState;
		}
	}
}
